<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"  
type="text/javascript"></script>  

<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Spring 登录</title>

<script type="text/javascript" language="javascript"> 
var fff= "asd";
function getid(x)
{
	fff="sss";
	var myurl = "/getcd?id="+x;
	$("#area1").load(location.href+' #area1>*')
}
</script>

</head>

<body>
	<br />
	<c:if test="${!empty error}">
		<font color="red">${error}</font>
	</c:if>
	<form action="<c:url value="/home.do?method=add2"/>" method="post">
		用户名：<input type="text" name="username" /><br /> 密 码：<input
			type="password" name="password" /><br /> 其他:：<input type="credits"
			name="credits" value="98652" /><br /> <input type="submit"
			name="btn" value="登录" />
	</form>
	<from> <select id="city" onchange = getid(this.value)>

		<c:forEach var="i" items="${addresses}">
			<option value="${i.cityCD}">
				${i.cityNM}</option>
		</c:forEach>

	</select> </from>
	<div id="area1">
	<from> <select id="city2" >

		<c:forEach var="i" items="${addresses2}">
			<option value="${i.cityCD}">
				${i.cityNM}</option>
		</c:forEach>

	</select> </from>
	$fff
	</div>
</body>
</html>
